 <?php
 $mabenh='';
 if(isset($benhhai['LoaiBenh']))
 {
    $mabenh = $benhhai['LoaiBenh']['id'];
 }
 ?>
 <?php if(!empty($loaibenhs)){ ?>
 <div id="left_content">
        <div class="left_block">
          <ul class="list_parent">
            <li class="block_title">Các bệnh về lúa</li>
            <?php foreach($loaibenhs as  $k=>$v){
            if(!empty($v['BenhHai'])){    
            ?>
            
            <li>
            <span class="parent_title <?php echo($mabenh===$v['LoaiBenh']['id'])?'current':''?>"><?php echo $v['LoaiBenh']['loai_benh']?></span>
                          
              <ul class="list_child" <?php echo($mabenh===$v['LoaiBenh']['id'])?'style="display: block;"':'style="display: none;"'?> >
               <?php foreach($v['BenhHai'] as $k1=>$v1){?>
                <li><a  href="<?php echo $this->Html->url("/pages/detail/".$v1['id']);?>"><?php echo $v1['ten_benh']?></a></li>
                
                <? } ?>
              </ul>
            </li>
            <?} }?>
            
            
          </ul>
        </div>
    </div>
    <?php } ?>